using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Web.SessionState;


public partial class MasterPage : System.Web.UI.MasterPage
{
    

    protected void Page_Init()
    {
            if (Session["Login"] == null)
            {
                Response.Redirect("Login.aspx");
            }
            else
            {
                 Login_Label.Text = Session["Login"].ToString();

                 CuentasButton.Visible = (bool)Session["CuentasConsultar"] ;

                 PerfilesButton.Visible = (bool)Session["PerfilesConsultar"];

                 TareasButton.Visible = (bool)Session["TareasConsultar"];

                 EntregablesButton.Visible = (bool)Session["EntregablesConsultar"];

                 EmpleadosButton.Visible = (bool)Session["EmpleadosConsultar"];

                 ClientesButton.Visible = (bool)Session["ClientesConsultar"];

                 ProyectosButton.Visible = (bool)Session["ProyectosConsultar"];

                 EstructuracionButton.Visible = (bool)Session["EstructuracionConsultar"];

                 ConsultasButton.Visible = (bool)Session["ConsultasConsultar"];

                 RegistroButton.Visible = (bool)Session["RegistroConsultar"];
            }


    }

    protected void Page_load()
    {
        if (Session["Login"] == null)
        {
            Response.Redirect("Login.aspx");
            Response.Redirect("Cuentas.aspx");
        }
    }


    public void colorChange(int numModulo)
    {
        switch (numModulo)
        {

            case 1:
                CuentasButton.ForeColor = System.Drawing.Color.White;

                
                CuentasButton.BackColor = System.Drawing.Color.Olive;


                CuentasButton.Font.Bold = true;

                break;

            case 2:

                TareasButton.ForeColor = System.Drawing.Color.White;



                TareasButton.BackColor = System.Drawing.Color.Olive;


                TareasButton.Font.Bold = true;
      
                break;

            case 3:

                EntregablesButton.ForeColor = System.Drawing.Color.White;

                EntregablesButton.BackColor = System.Drawing.Color.Olive;

                EntregablesButton.Font.Bold = true;

                break;

            case 4:

                EmpleadosButton.ForeColor = System.Drawing.Color.White;



                EmpleadosButton.BackColor = System.Drawing.Color.Olive;



                EmpleadosButton.Font.Bold = true;
 
                break;

            case 5:

                ClientesButton.ForeColor = System.Drawing.Color.White;

                ClientesButton.BackColor = System.Drawing.Color.Olive;

                ClientesButton.Font.Bold = true;
 
                break;

            case 6:

                PerfilesButton.ForeColor = System.Drawing.Color.White;

                PerfilesButton.BackColor = System.Drawing.Color.Olive;


                PerfilesButton.Font.Bold = true;
                break;
            case 7:

                ProyectosButton.ForeColor = System.Drawing.Color.White;
                ProyectosButton.BackColor = System.Drawing.Color.Olive;
                ProyectosButton.Font.Bold = true;

                break;
            case 8:

                EstructuracionButton.ForeColor = System.Drawing.Color.White;

                EstructuracionButton.BackColor = System.Drawing.Color.Olive;


                EstructuracionButton.Font.Bold = true;
                break;
            case 9:

                ConsultasButton.ForeColor = System.Drawing.Color.White;

                ConsultasButton.BackColor = System.Drawing.Color.Olive;


                ConsultasButton.Font.Bold = true;
                break;
            case 10:

                RegistroButton.ForeColor = System.Drawing.Color.White;

                RegistroButton.BackColor = System.Drawing.Color.Olive;


                RegistroButton.Font.Bold = true;
                break;

        }
    }

}
